package com.project.service.impl;

import com.github.pagehelper.PageInfo;
import com.project.bean.PeopleBean;
import com.project.mapper.IPeopleMapper;
import com.project.service.IPeopleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.time.LocalDate;
import java.util.List;
@Service
@Transactional
public class PeopleServiceImpl implements IPeopleService {
    @Autowired
    private IPeopleMapper mapper;

    @Override
    public void add(PeopleBean people) {
        mapper.add(people);
    }

    @Override
    public void delete(int id) {
        mapper.delete(id);
    }

    @Override
    public void update(int id, LocalDate birth) {
        mapper.update(id, birth);
    }

    @Override
    public List<PeopleBean> searchAll() {
        return mapper.searchAll();
    }

    public final int PAGESIZE= 3;
    @Override
    public PageInfo<PeopleBean> findByItem(int pageNO, String name, LocalDate start, LocalDate end) {

        return null;
    }
}
